/*
 * @Author: jth2514 1509572300@qq.com
 * @Date: 2024-05-19 14:28:33
 * @LastEditors: jth2514 1509572300@qq.com
 * @LastEditTime: 2024-05-19 15:19:59
 * @FilePath: \undefinedh:\c++\java\Test.java
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
interface Iarea
{
    public double area(double r);
    double PI=3.1415926;
}

class Circle implements Iarea
{
    private double cR;
    private double cArea;
    public void setR(double r)
    {
        cR=r;
        cArea=area(r);
    }
    public double getR()
    {
        return cR;
    }
    public double area(double r)
    {
        cArea=PI*r*r;
        return cArea;
    }

}


public class Test
{
    public static void main(String args[])
    {
        Circle circle =new Circle();
        circle.setR(5);
        double r1=circle.getR();
        double areal=circle.area(r1);
        System.out.println("面积:"+areal);
    }
}